Optimal. Leaf size=587 \[ \frac {g^2 \sqrt {a+b x+c x^2}}{2 (e f-d g) \left (c f^2-b f g+a g^2\right ) (f+g x)^2}+\frac {3 g^2 (2 c f-b g) \sqrt {a+b x+c x^2}}{4 (e f-d g) \left (c f^2-b f g+a g^2\right )^2 (f+g x)}+\frac {e g^2 \sqrt {a+b x+c x^2}}{(e f-d g)^2 \left (c f^2-b f g+a g^2\right ) (f+g x)}+\frac {e^3 \tanh ^{-1}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{\sqrt {c d^2-b d e+a e^2} (e f-d g)^3}-\frac {e g (2 c f-b g) \tanh ^{-1}\left (\frac {b f-2 a g+(2 c f-b g) x}{2 \sqrt {c f^2-b f g+a g^2} \sqrt {a+b x+c x^2}}\right )}{2 (e f-d g)^2 \left (c f^2-b f g+a g^2\right )^{3/2}}-\frac {e^2 g \tanh ^{-1}\left (\frac {b f-2 a g+(2 c f-b g) x}{2 \sqrt {c f^2-b f g+a g^2} \sqrt {a+b x+c x^2}}\right )}{(e f-d g)^3 \sqrt {c f^2-b f g+a g^2}}-\frac {g \left (8 c^2 f^2+3 b^2 g^2-4 c g (2 b f+a g)\right ) \tanh ^{-1}\left (\frac {b f-2 a g+(2 c f-b g) x}{2 \sqrt {c f^2-b f g+a g^2} \sqrt {a+b x+c x^2}}\right )}{8 (e f-d g) \left (c f^2-b f g+a g^2\right )^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.56, antiderivative size = 587, normalized size of antiderivative = 1.00, number of steps
used = 13, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {974, 738, 212,
758, 820, 744} \begin {gather*} -\frac {g \left (-4 c g (a g+2 b f)+3 b^2 g^2+8 c^2 f^2\right ) \tanh ^{-1}\left (\frac {-2 a g+x (2 c f-b g)+b f}{2 \sqrt {a+b x+c x^2} \sqrt {a g^2-b f g+c f^2}}\right )}{8 (e f-d g) \left (a g^2-b f g+c f^2\right )^{5/2}}+\frac {e^3 \tanh ^{-1}\left (\frac {-2 a e+x (2 c d-b e)+b d}{2 \sqrt {a+b x+c x^2} \sqrt {a e^2-b d e+c d^2}}\right )}{(e f-d g)^3 \sqrt {a e^2-b d e+c d^2}}-\frac {e^2 g \tanh ^{-1}\left (\frac {-2 a g+x (2 c f-b g)+b f}{2 \sqrt {a+b x+c x^2} \sqrt {a g^2-b f g+c f^2}}\right )}{(e f-d g)^3 \sqrt {a g^2-b f g+c f^2}}+\frac {e g^2 \sqrt {a+b x+c x^2}}{(f+g x) (e f-d g)^2 \left (a g^2-b f g+c f^2\right )}+\frac {3 g^2 \sqrt {a+b x+c x^2} (2 c f-b g)}{4 (f+g x) (e f-d g) \left (a g^2-b f g+c f^2\right )^2}+\frac {g^2 \sqrt {a+b x+c x^2}}{2 (f+g x)^2 (e f-d g) \left (a g^2-b f g+c f^2\right )}-\frac {e g (2 c f-b g) \tanh ^{-1}\left (\frac {-2 a g+x (2 c f-b g)+b f}{2 \sqrt {a+b x+c x^2} \sqrt {a g^2-b f g+c f^2}}\right )}{2 (e f-d g)^2 \left (a g^2-b f g+c f^2\right )^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 738
Rule 744
Rule 758
Rule 820
Rule 974
Rubi steps
\begin {align*} \int \frac {1}{(d+e x) (f+g x)^3 \sqrt {a+b x+c x^2}} \, dx &=\int \left (\frac {e^3}{(e f-d g)^3 (d+e x) \sqrt {a+b x+c x^2}}-\frac {g}{(e f-d g) (f+g x)^3 \sqrt {a+b x+c x^2}}-\frac {e g}{(e f-d g)^2 (f+g x)^2 \sqrt {a+b x+c x^2}}-\frac {e^2 g}{(e f-d g)^3 (f+g x) \sqrt {a+b x+c x^2}}\right ) \, dx\\ &=\frac {e^3 \int \frac {1}{(d+e x) \sqrt {a+b x+c x^2}} \, dx}{(e f-d g)^3}-\frac {\left (e^2 g\right ) \int \frac {1}{(f+g x) \sqrt {a+b x+c x^2}} \, dx}{(e f-d g)^3}-\frac {(e g) \int \frac {1}{(f+g x)^2 \sqrt {a+b x+c x^2}} \, dx}{(e f-d g)^2}-\frac {g \int \frac {1}{(f+g x)^3 \sqrt {a+b x+c x^2}} \, dx}{e f-d g}\\ &=\frac {g^2 \sqrt {a+b x+c x^2}}{2 (e f-d g) \left (c f^2-b f g+a g^2\right ) (f+g x)^2}+\frac {e g^2 \sqrt {a+b x+c x^2}}{(e f-d g)^2 \left (c f^2-b f g+a g^2\right ) (f+g x)}-\frac {\left (2 e^3\right ) \text {Subst}\left (\int \frac {1}{4 c d^2-4 b d e+4 a e^2-x^2} \, dx,x,\frac {-b d+2 a e-(2 c d-b e) x}{\sqrt {a+b x+c x^2}}\right )}{(e f-d g)^3}+\frac {\left (2 e^2 g\right ) \text {Subst}\left (\int \frac {1}{4 c f^2-4 b f g+4 a g^2-x^2} \, dx,x,\frac {-b f+2 a g-(2 c f-b g) x}{\sqrt {a+b x+c x^2}}\right )}{(e f-d g)^3}-\frac {(e g (2 c f-b g)) \int \frac {1}{(f+g x) \sqrt {a+b x+c x^2}} \, dx}{2 (e f-d g)^2 \left (c f^2-b f g+a g^2\right )}+\frac {g \int \frac {\frac {1}{2} (-4 c f+3 b g)+c g x}{(f+g x)^2 \sqrt {a+b x+c x^2}} \, dx}{2 (e f-d g) \left (c f^2-b f g+a g^2\right )}\\ &=\frac {g^2 \sqrt {a+b x+c x^2}}{2 (e f-d g) \left (c f^2-b f g+a g^2\right ) (f+g x)^2}+\frac {3 g^2 (2 c f-b g) \sqrt {a+b x+c x^2}}{4 (e f-d g) \left (c f^2-b f g+a g^2\right )^2 (f+g x)}+\frac {e g^2 \sqrt {a+b x+c x^2}}{(e f-d g)^2 \left (c f^2-b f g+a g^2\right ) (f+g x)}+\frac {e^3 \tanh ^{-1}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{\sqrt {c d^2-b d e+a e^2} (e f-d g)^3}-\frac {e^2 g \tanh ^{-1}\left (\frac {b f-2 a g+(2 c f-b g) x}{2 \sqrt {c f^2-b f g+a g^2} \sqrt {a+b x+c x^2}}\right )}{(e f-d g)^3 \sqrt {c f^2-b f g+a g^2}}+\frac {(e g (2 c f-b g)) \text {Subst}\left (\int \frac {1}{4 c f^2-4 b f g+4 a g^2-x^2} \, dx,x,\frac {-b f+2 a g-(2 c f-b g) x}{\sqrt {a+b x+c x^2}}\right )}{(e f-d g)^2 \left (c f^2-b f g+a g^2\right )}-\frac {\left (g \left (8 c^2 f^2+3 b^2 g^2-4 c g (2 b f+a g)\right )\right ) \int \frac {1}{(f+g x) \sqrt {a+b x+c x^2}} \, dx}{8 (e f-d g) \left (c f^2-b f g+a g^2\right )^2}\\ &=\frac {g^2 \sqrt {a+b x+c x^2}}{2 (e f-d g) \left (c f^2-b f g+a g^2\right ) (f+g x)^2}+\frac {3 g^2 (2 c f-b g) \sqrt {a+b x+c x^2}}{4 (e f-d g) \left (c f^2-b f g+a g^2\right )^2 (f+g x)}+\frac {e g^2 \sqrt {a+b x+c x^2}}{(e f-d g)^2 \left (c f^2-b f g+a g^2\right ) (f+g x)}+\frac {e^3 \tanh ^{-1}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{\sqrt {c d^2-b d e+a e^2} (e f-d g)^3}-\frac {e g (2 c f-b g) \tanh ^{-1}\left (\frac {b f-2 a g+(2 c f-b g) x}{2 \sqrt {c f^2-b f g+a g^2} \sqrt {a+b x+c x^2}}\right )}{2 (e f-d g)^2 \left (c f^2-b f g+a g^2\right )^{3/2}}-\frac {e^2 g \tanh ^{-1}\left (\frac {b f-2 a g+(2 c f-b g) x}{2 \sqrt {c f^2-b f g+a g^2} \sqrt {a+b x+c x^2}}\right )}{(e f-d g)^3 \sqrt {c f^2-b f g+a g^2}}+\frac {\left (g \left (8 c^2 f^2+3 b^2 g^2-4 c g (2 b f+a g)\right )\right ) \text {Subst}\left (\int \frac {1}{4 c f^2-4 b f g+4 a g^2-x^2} \, dx,x,\frac {-b f+2 a g-(2 c f-b g) x}{\sqrt {a+b x+c x^2}}\right )}{4 (e f-d g) \left (c f^2-b f g+a g^2\right )^2}\\ &=\frac {g^2 \sqrt {a+b x+c x^2}}{2 (e f-d g) \left (c f^2-b f g+a g^2\right ) (f+g x)^2}+\frac {3 g^2 (2 c f-b g) \sqrt {a+b x+c x^2}}{4 (e f-d g) \left (c f^2-b f g+a g^2\right )^2 (f+g x)}+\frac {e g^2 \sqrt {a+b x+c x^2}}{(e f-d g)^2 \left (c f^2-b f g+a g^2\right ) (f+g x)}+\frac {e^3 \tanh ^{-1}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{\sqrt {c d^2-b d e+a e^2} (e f-d g)^3}-\frac {e g (2 c f-b g) \tanh ^{-1}\left (\frac {b f-2 a g+(2 c f-b g) x}{2 \sqrt {c f^2-b f g+a g^2} \sqrt {a+b x+c x^2}}\right )}{2 (e f-d g)^2 \left (c f^2-b f g+a g^2\right )^{3/2}}-\frac {e^2 g \tanh ^{-1}\left (\frac {b f-2 a g+(2 c f-b g) x}{2 \sqrt {c f^2-b f g+a g^2} \sqrt {a+b x+c x^2}}\right )}{(e f-d g)^3 \sqrt {c f^2-b f g+a g^2}}-\frac {g \left (8 c^2 f^2+3 b^2 g^2-4 c g (2 b f+a g)\right ) \tanh ^{-1}\left (\frac {b f-2 a g+(2 c f-b g) x}{2 \sqrt {c f^2-b f g+a g^2} \sqrt {a+b x+c x^2}}\right )}{8 (e f-d g) \left (c f^2-b f g+a g^2\right )^{5/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 11.51, size = 549, normalized size = 0.94 \begin {gather*} \frac {\frac {4 g^2 (e f-d g)^2 \sqrt {a+x (b+c x)}}{\left (c f^2+g (-b f+a g)\right ) (f+g x)^2}+\frac {8 e g^2 (e f-d g) \sqrt {a+x (b+c x)}}{\left (c f^2+g (-b f+a g)\right ) (f+g x)}+\frac {8 e^3 \tanh ^{-1}\left (\frac {-2 a e+2 c d x+b (d-e x)}{2 \sqrt {c d^2+e (-b d+a e)} \sqrt {a+x (b+c x)}}\right )}{\sqrt {c d^2+e (-b d+a e)}}+\frac {4 e g (-2 c f+b g) (e f-d g) \tanh ^{-1}\left (\frac {-2 a g+2 c f x+b (f-g x)}{2 \sqrt {c f^2+g (-b f+a g)} \sqrt {a+x (b+c x)}}\right )}{\left (c f^2+g (-b f+a g)\right )^{3/2}}-\frac {8 e^2 g \tanh ^{-1}\left (\frac {-2 a g+2 c f x+b (f-g x)}{2 \sqrt {c f^2+g (-b f+a g)} \sqrt {a+x (b+c x)}}\right )}{\sqrt {c f^2+g (-b f+a g)}}+g (e f-d g)^2 \left (\frac {6 g (2 c f-b g) \sqrt {a+x (b+c x)}}{\left (c f^2+g (-b f+a g)\right )^2 (f+g x)}-\frac {\left (8 c^2 f^2+3 b^2 g^2-4 c g (2 b f+a g)\right ) \tanh ^{-1}\left (\frac {-2 a g+2 c f x+b (f-g x)}{2 \sqrt {c f^2+g (-b f+a g)} \sqrt {a+x (b+c x)}}\right )}{\left (c f^2+g (-b f+a g)\right )^{5/2}}\right )}{8 (e f-d g)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1184\) vs.
\(2(541)=1082\).
time = 0.13, size = 1185, normalized size = 2.02
method | result | size |
default | \(\frac {e^{2} \ln \left (\frac {\frac {2 a \,e^{2}-2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (e b -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}\, \sqrt {c \left (x +\frac {d}{e}\right )^{2}+\frac {\left (e b -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{\left (d g -e f \right )^{3} \sqrt {\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}-\frac {e^{2} \ln \left (\frac {\frac {2 a \,g^{2}-2 b f g +2 c \,f^{2}}{g^{2}}+\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+2 \sqrt {\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}\, \sqrt {\left (x +\frac {f}{g}\right )^{2} c +\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}{x +\frac {f}{g}}\right )}{\left (d g -e f \right )^{3} \sqrt {\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}+\frac {-\frac {g^{2} \sqrt {\left (x +\frac {f}{g}\right )^{2} c +\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}{2 \left (a \,g^{2}-b f g +c \,f^{2}\right ) \left (x +\frac {f}{g}\right )^{2}}-\frac {3 \left (b g -2 c f \right ) g \left (-\frac {g^{2} \sqrt {\left (x +\frac {f}{g}\right )^{2} c +\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}{\left (a \,g^{2}-b f g +c \,f^{2}\right ) \left (x +\frac {f}{g}\right )}+\frac {\left (b g -2 c f \right ) g \ln \left (\frac {\frac {2 a \,g^{2}-2 b f g +2 c \,f^{2}}{g^{2}}+\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+2 \sqrt {\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}\, \sqrt {\left (x +\frac {f}{g}\right )^{2} c +\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}{x +\frac {f}{g}}\right )}{2 \left (a \,g^{2}-b f g +c \,f^{2}\right ) \sqrt {\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}\right )}{4 \left (a \,g^{2}-b f g +c \,f^{2}\right )}+\frac {c \,g^{2} \ln \left (\frac {\frac {2 a \,g^{2}-2 b f g +2 c \,f^{2}}{g^{2}}+\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+2 \sqrt {\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}\, \sqrt {\left (x +\frac {f}{g}\right )^{2} c +\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}{x +\frac {f}{g}}\right )}{2 \left (a \,g^{2}-b f g +c \,f^{2}\right ) \sqrt {\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}}{g^{2} \left (d g -e f \right )}-\frac {e \left (-\frac {g^{2} \sqrt {\left (x +\frac {f}{g}\right )^{2} c +\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}{\left (a \,g^{2}-b f g +c \,f^{2}\right ) \left (x +\frac {f}{g}\right )}+\frac {\left (b g -2 c f \right ) g \ln \left (\frac {\frac {2 a \,g^{2}-2 b f g +2 c \,f^{2}}{g^{2}}+\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+2 \sqrt {\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}\, \sqrt {\left (x +\frac {f}{g}\right )^{2} c +\frac {\left (b g -2 c f \right ) \left (x +\frac {f}{g}\right )}{g}+\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}{x +\frac {f}{g}}\right )}{2 \left (a \,g^{2}-b f g +c \,f^{2}\right ) \sqrt {\frac {a \,g^{2}-b f g +c \,f^{2}}{g^{2}}}}\right )}{g \left (d g -e f \right )^{2}}\) | \(1185\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\left (d + e x\right ) \left (f + g x\right )^{3} \sqrt {a + b x + c x^{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 2256 vs.
\(2 (550) = 1100\).
time = 4.86, size = 2256, normalized size = 3.84 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {1}{{\left (f+g\,x\right )}^3\,\left (d+e\,x\right )\,\sqrt {c\,x^2+b\,x+a}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________